1 <md-dialog class="zohoAccount-dialog" aria-label="New ZohoAccount">
 
   2   <form name="zohoAccountForm" class="md-inline-form" novalidate>
 
   3     <md-toolbar class="md-accent md-hue-2">
 
   5         class="md-toolbar-tools"
 
   7         layout-align="space-between center"
 
   9         <span class="title">{{ vm.title | translate }}</span>
 
  10         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
 
  12             md-font-icon="icon-close"
 
  13             aria-label="Close dialog"
 
  19     <md-dialog-content ms-scroll>
 
  20       <div class="error-list">
 
  22           ng-repeat="error in vm.errors"
 
  25           layout-align="space-between center"
 
  28             <span class="message">{{error.message}}</span>
 
  29             <span class="type">({{error.type}})</span>
 
  31           <md-button class="md-icon-button">
 
  33               md-font-icon="icon-alert-box"
 
  34               aria-label="alert error"
 
  40       <md-input-container class="md-block">
 
  41         <label translate="INTEGRATIONS.NAME">Name</label>
 
  45           ng-model="vm.zohoAccount.name"
 
  51           ng-messages="zohoAccountForm['name'].$error"
 
  52           ng-show="zohoAccountForm['name'].$touched"
 
  55           <div ng-message="required">
 
  56             <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
 
  57               >Name field is required</span
 
  62       <md-input-container class="md-block">
 
  63         <label translate="INTEGRATIONS.HOST">Host</label>
 
  64         <md-select name="host" ng-model="vm.zohoAccount.host" required>
 
  65           <md-option ng-value="'zoho.com'">zoho.com</md-option>
 
  66           <md-option ng-value="'zoho.eu'">zoho.eu</md-option>
 
  69           ng-messages="zohoAccountForm['host'].$error"
 
  70           ng-show="zohoAccountForm['host'].$touched"
 
  73           <div ng-message="required">
 
  74             <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED"
 
  75               >Host field is required</span
 
  80       <md-input-container class="md-block">
 
  81         <label translate="INTEGRATIONS.ZONE">Zone</label>
 
  82         <md-select name="zone" ng-model="vm.zohoAccount.zone" required>
 
  83           <md-option ng-value="'US'">US</md-option>
 
  84           <md-option ng-value="'AU'">AU</md-option>
 
  85           <md-option ng-value="'EU'">EU</md-option>
 
  86           <md-option ng-value="'IN'">IN</md-option>
 
  87           <md-option ng-value="'CN'">CN</md-option>
 
  89         <div class="hint"><span translate="INTEGRATIONS.HELP.ZONE"></span></div>
 
  91           ng-messages="zohoAccountForm['zone'].$error"
 
  92           ng-show="zohoAccountForm['zone'].$touched"
 
  95           <div ng-message="required">
 
  96             <span translate="INTEGRATIONS.ERRORS.ZONE_REQUIRED"
 
  97               >Zone field is required</span
 
 101       </md-input-container>
 
 102       <md-input-container class="md-block">
 
 103         <label translate="INTEGRATIONS.CLIENTID">ClientId</label>
 
 107           ng-model="vm.zohoAccount.clientId"
 
 112           <span translate="INTEGRATIONS.HELP.CLIENTID"></span>
 
 115           ng-messages="zohoAccountForm['clientId'].$error"
 
 116           ng-show="zohoAccountForm['clientId'].$touched"
 
 119           <div ng-message="required">
 
 120             <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED"
 
 121               >ClientId field is required</span
 
 125       </md-input-container>
 
 126       <md-input-container class="md-block">
 
 127         <label translate="INTEGRATIONS.CLIENTSECRET">ClientSecret</label>
 
 131           ng-model="vm.zohoAccount.clientSecret"
 
 136           <span translate="INTEGRATIONS.HELP.CLIENTSECRET"></span>
 
 139           ng-messages="zohoAccountForm['clientSecret'].$error"
 
 140           ng-show="zohoAccountForm['clientSecret'].$touched"
 
 143           <div ng-message="required">
 
 144             <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED"
 
 145               >ClientSecret field is required</span
 
 149       </md-input-container>
 
 150       <md-input-container class="md-block">
 
 151         <label translate="INTEGRATIONS.CODE">Code</label>
 
 155           ng-model="vm.zohoAccount.code"
 
 159         <div class="hint"><span translate="INTEGRATIONS.HELP.CODE"></span></div>
 
 161           ng-messages="zohoAccountForm['code'].$error"
 
 162           ng-show="zohoAccountForm['code'].$touched"
 
 165           <div ng-message="required">
 
 166             <span translate="INTEGRATIONS.ERRORS.CODE_REQUIRED"
 
 167               >Code field is required</span
 
 171       </md-input-container>
 
 172       <md-input-container class="md-block">
 
 173         <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
 
 174           >MotionProxyAddress</label
 
 179           ng-model="vm.zohoAccount.serverUrl"
 
 183           <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
 
 186           ng-messages="zohoAccountForm['serverUrl'].$error"
 
 187           ng-show="zohoAccountForm['serverUrl'].$touched"
 
 190           <div ng-message="required">
 
 191             <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
 
 192               >MotionProxyAddress field is required</span
 
 195           <div ng-message="url">
 
 197               translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
 
 198               >MotionProxyAddress must be a valid url
 
 199               http://www.xcally.com</span
 
 203       </md-input-container>
 
 204       <md-input-container class="md-block">
 
 205         <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
 
 209           ng-model="vm.zohoAccount.description"
 
 213           ng-messages="zohoAccountForm['description'].$error"
 
 214           ng-show="zohoAccountForm['description'].$touched"
 
 217           <div ng-message="required">
 
 218             <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
 
 219               >Description field is required</span
 
 223       </md-input-container>
 
 225       <div class="error-list">
 
 227           ng-repeat="error in vm.errors"
 
 230           layout-align="space-between center"
 
 233             <span class="message">{{error.message}}</span>
 
 234             <span class="type">({{error.type}})</span>
 
 236           <md-button class="md-icon-button">
 
 238               md-font-icon="icon-alert-box"
 
 239               aria-label="alert error"
 
 249       layout-align="space-between center"
 
 250       ng-if="!vm.crudPermissions.readOnly"
 
 252       <div layout="row" layout-align="start center">
 
 255           ng-if="vm.crudPermissions.canEdit && !vm.newZohoAccount"
 
 256           ng-click="vm.saveZohoAccount()"
 
 257           class="send-button md-accent md-raised"
 
 258           ng-disabled="zohoAccountForm.$invalid || zohoAccountForm.$pristine"
 
 260           translate="INTEGRATIONS.SAVE"
 
 261           translate-attr-aria-label="INTEGRATIONS.SAVE"
 
 268           ng-if="vm.crudPermissions.canEdit && vm.newZohoAccount"
 
 269           ng-click="vm.addNewZohoAccount()"
 
 270           class="send-button md-accent md-raised"
 
 271           ng-disabled="zohoAccountForm.$invalid"
 
 273           translate="INTEGRATIONS.ADD_ZOHOACCOUNT"
 
 274           translate-attr-aria-label="INTEGRATIONS.ADD_ZOHOACCOUNT"
 
 281           class="md-icon-button"
 
 282           ng-if="vm.crudPermissions.canDelete && !vm.newZohoAccount"
 
 283           ng-click="vm.deleteZohoAccount($event)"
 
 286           translate-attr-aria-label="INTEGRATIONS.DELETE"
 
 288           <md-icon md-font-icon="icon-delete"></md-icon>
 
 290             ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip